<?php
/**
 * Created By PhpStorm
 * Author: patrick wu
 * Date: 2020/9/24
 * Time: 16:35
 */
namespace App\Http\Controllers\Admin;

use App\User;
use App\Http\Model\MongoDB\ShopConfig;
use App\Http\Model\MongoDB\ShopTemplate;
use App\Utils\WechatUtil;

class UserController extends BaseController
{
    /**
     * 获取后台用户信息
     * @return \Illuminate\Http\JsonResponse
     */
    public function infoUser()
    {
        return $this->successResponse($this->request->post('admin_user'));
    }


    public function configUser()
    {
        /*$imgsrc =   WechatUtil::getUnlimitedCode(['scene' => 'index']);
        echo "<img src='{$imgsrc}'>";exit;*/
        $shop_config    =   ShopTemplate::query()->where(['_id' => 'e8573972-aded-4c09-a52f-8c5cd781ca29'])->first();   // 27579630-3fa1-4d44-a7df-5d3ae0262dbb
        dd($shop_config->preview);
    }
}
